package com.qriver.gateway;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

import com.qriver.auth.client.annotation.EnableQriverAuthClient;
import com.qriver.gateway.filter.AccessGatewayFilter;

/**
 * 网关路由
 * @author hsh
 *
 */
@SpringBootApplication
@EnableDiscoveryClient
@EnableQriverAuthClient
@EnableFeignClients
public class GatewayApplication {
	
	
	public static void main(String[] args) {
		SpringApplication.run(GatewayApplication.class, args);
	}
	@Bean
	public AccessGatewayFilter tokenFilter(){
		return new AccessGatewayFilter();
	}
	/*
	 * @Bean public HiddenHttpMethodFilter hiddenHttpMethodFilter() { return new
	 * HiddenHttpMethodFilter() {
	 * 
	 * @Override public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain
	 * chain) { return chain.filter(exchange); } }; }
	 */
	
}
